home *** CD-ROM | disk | FTP | other *** search
/ PC Media 7 / PC MEDIA CD07.iso / share / uwin / cassette / tapeview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-29  |  2.5 KB  |  86 lines

  1. // Copyright (c) 1994, William Wagner
  2. // All Rights reserved.
  3. //
  4. // This source is a portion of a shareware program.  It may be distributed
  5. // only in its entirety.  The copyright statements must be included with any 
  6. // reproduction of this source.
  7. // 
  8.  
  9. // tapeview.h : header file
  10. //
  11.  
  12. #ifndef __TAPEVIEW_H__
  13. #define __TAPEVIEW_H__
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CTapeView form view
  16. //
  17. //This class defines the form used to enter data in the tape label.
  18. //There is one trick being employed here: All the form data exchange is done
  19. // via document member variables.
  20. //There is one other area of interest:
  21. // This class overrides the OnCtlColor member in order to set the default
  22. // gray background.
  23.  
  24. class CTapeView : public CFormView
  25. {
  26.     DECLARE_DYNCREATE(CTapeView)
  27. protected:
  28.     CTapeView();            // protected constructor used by dynamic creation
  29.  
  30. // Form Data
  31. public:
  32.     //{{AFX_DATA(CTapeView)
  33.     enum { IDD = IDD_CASSETTE };
  34.     //}}AFX_DATA
  35.  
  36. // Attributes
  37. public:
  38.     //Get a pointer to our document.
  39.     CCassetteDoc* GetDocument();
  40.  
  41.  
  42. private:
  43.     //Handle to the brush to use for the background drawing.
  44.     HBRUSH  m_hCtlBrush;
  45.  
  46. // Operations
  47. public:
  48.     //return a pointer to our frame.
  49.     inline CMainFrame* GetParentFrame () const
  50.         { return (CMainFrame*) CFormView::GetParentFrame ();};
  51.  
  52. // Implementation
  53. protected:
  54.     //Handle the initial update message.
  55.     virtual void OnInitialUpdate ();
  56.     //Handle other update messages.  
  57.     virtual void OnUpdate (CView* pSender, LPARAM lHint, CObject* pHint);
  58.     //Destruction.
  59.     virtual ~CTapeView();
  60.     //Data Exchange
  61.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  62.  
  63.     // Generated message map functions
  64.     //Our message maps handles the control color message.  In addition,
  65.     // we accept EN_CHANGE messages on all of the edit controls.
  66.     //{{AFX_MSG(CTapeView)                                      
  67.     afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  68.     afx_msg void OnChangeAlbum1();
  69.     afx_msg void OnChangeAlbum2();
  70.     afx_msg void OnChangeArtist1();
  71.     afx_msg void OnChangeArtist2();
  72.     afx_msg void OnChangeNotes();
  73.     afx_msg void OnChangeSongs1();
  74.     afx_msg void OnChangeSongs2();
  75.     //}}AFX_MSG
  76.     DECLARE_MESSAGE_MAP()
  77. };
  78.  
  79. #ifndef _DEBUG // debug version in tapeview.cpp
  80. inline CCassetteDoc* CTapeView::GetDocument()
  81.    { return (CCassetteDoc*) m_pDocument; }
  82. #endif
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85. #endif
  86.